package com.example.education.service;

import com.example.education.exception.ParamException;
import com.example.education.model.Question;

import java.util.List;

/**
 * 提问模块：提供对教学资源的提问，删除提问，精选提问和查询提问的接口。
 */
public interface QuestionService {

    /**
     * 新增提问
     * @param question
     * @return
     */
    boolean insertQuestion(Question question) throws ParamException;

    /**
     * 删除提问
     * @param questionId 提问编号
     * @return
     */
    boolean deleteQuestion(Integer questionId) throws ParamException;

    /**
     * 精选提问
     * @param questionId
     * @return
     */
    boolean topQuestion(Integer questionId) throws ParamException;

    /**
     * 取消精选
     * @param questionId
     * @return
     */
    boolean unTopQuestion(Integer questionId) throws ParamException;

    /**
     * 根据编号查询提问
     * @param questionId
     * @return
     */
    Question getQuestionById(Integer questionId) throws ParamException;

    /**
     * 根据课程查询提问列表
     * @param courseId
     * @return
     */
    List<Question> getQuestionByCourseId(Integer courseId) throws ParamException;
}
